import { StructDto } from './struct.dto';
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsNotEmpty, IsArray } from 'class-validator';

export class CreateStructDto extends StructDto {

  @ApiProperty({ required: true, description: '组织结构' })
  @IsString({ message: '组织结构名称必须为字符类型' })
  @IsNotEmpty({ message: '组织结构名称不能为空' })
  readonly name: string;

  @ApiProperty({
    required: true,
    description: '归属区域',
  })
  readonly area: string;

  @ApiProperty({
    required: true,
    description: '机构编码',
  })
  readonly code: number;

  @ApiProperty({
    required: true,
    description: '上级机构',
  })
  readonly pid: number;

}
